import {createRouter, createWebHashHistory} from 'vue-router'

import App from "../view/App3.0.vue";
import Layout from "../Layout.vue";
import VueUse from "../view/VueUse.vue";
import useRefHistory from "../components/vueuse/useRefHistory.vue";
import useVModel from "../components/vueuse/useVModel.vue";
import useTemplateRefsList from "../components/vueuse/useTemplateRefsList.vue";

const routes = [
  {
    path: '/',
    component: Layout,
    children: [
      {
        path: '/',
        component: App
      },
      {
        path: '/vueuse',
        component: VueUse,
        children: [
          {
            path: '/vueuse/useRefHistory',
            component: useRefHistory
          },
          {
            path: '/vueuse/useVModel',
            component: useVModel
          },
          {
            path: '/vueuse/useTemplateRefsList',
            component: useTemplateRefsList
          }
        ]
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
});

export default router
